package de.szut.traineeslife.ui;


import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ListView;

import com.actionbarsherlock.app.SherlockListFragment;

import de.szut.traineeslife.R;

public class FragmentOverview
    extends SherlockListFragment {
    
    @Override
    public View onCreateView( LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState ) {
        View rootView = inflater.inflate( R.layout.frag_overview,container,false );
        return rootView;
    }

    @Override
    public void onActivityCreated( Bundle savedInstanceState ) {
        super.onActivityCreated( savedInstanceState );
        String[] values =
            new String[] { "Test1", "Test2", "Test3", "Test4", "Test5", "Test6", "Test7",
                "Test8", "Test9", "Test10" };
        ArrayAdapter<String> adapter =
            new ArrayAdapter<String>( getActivity(), android.R.layout.simple_list_item_1, values );
        setListAdapter( adapter );
    }

    @Override
    public void onListItemClick( ListView l, View v, int position, long id ) {
        // Do something with the data
    }
}
